package com.woniu.micropropertyserver.mapper;

import com.github.pagehelper.PageInfo;
import com.woniu.microcommonsserver.entity.PassCarCheckEntity;
import com.woniu.micropropertyserver.bean.DeployParkCCheck;
import com.woniu.micropropertyserver.util.PageRest;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author ：bb
 * @date ：Created in 2021/2/2 0002
 * @description：
 * @modified By：
 * @version: $
 */
@Mapper
public interface PassCarCheckMapper {
   @Options(
           useGeneratedKeys = true,
           keyProperty = "p.id"
   )
    @Insert("insert into pass_car_check (id,item,car_num,car_owner,phone,packing_place,check_status,authorize_start_date,authorize_end_date,remark) values(null,#{p.item},#{p.carNum},#{p.carOwner},#{p.phone},#{p.packingPlace},#{p.checkStatus},#{p.authorizeStartDate},#{p.authorizeEndDate},#{p.remark}) ")
    int saveInfo(@Param("p") DeployParkCCheck passCarCheckEntity);

    List<DeployParkCCheck> findByParam(@Param("r") PageRest pageRest,@Param("p") DeployParkCCheck passCarCheckEntity);

    DeployParkCCheck findByCarNum(String  CarNum);


    int updateInfo(@Param("p") DeployParkCCheck passCarCheckEntity);

    @Delete("delete from pass_car_check where id=#{id}")
    int cancelInfo(Long id);
}
